using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace MosziNET.Web.Gallery.Template
{
    /// <summary>
    /// The folder is internally represented with this control
    /// </summary>
    internal class FolderControl : PlaceHolder
    {
        public HtmlAnchor folderLink = new HtmlAnchor();
        public HtmlImage folderThumbnail = new HtmlImage();
        public Literal title = new Literal();

        public FolderControl(string cssClass)
        {
            Panel mainPanel = new Panel();
            Panel linkPanel = new Panel();
            Panel textPanel = new Panel();

            mainPanel.Controls.Add(linkPanel);
            mainPanel.Controls.Add(textPanel);

            folderLink.Controls.Add(folderThumbnail);
            linkPanel.Controls.Add(folderLink);

            textPanel.Controls.Add(title);

            if (!String.IsNullOrEmpty(cssClass))
                mainPanel.CssClass = cssClass;

            this.Controls.Add(mainPanel);
        }
    }
}
